package Structs;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Task {

	String Titulo;
	Member Author;
	GregorianCalendar Modified;
	boolean complete;
	int id;
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Task(String Titulo, Member Author, GregorianCalendar Modified){
		
		this.Titulo = Titulo;
		this.Author = Author;
		this.Modified = Modified;
		this.complete=false;
	}
	
	public Task(int id,String Titulo, Member Author, GregorianCalendar Modified){
		this.id = id;
		this.Titulo = Titulo;
		this.Author = Author;
		this.Modified = Modified;
		this.complete=false;
	}
	
	public Member getAuthor() {
		return this.Author;
	}
	
	public GregorianCalendar getModified() {
		return this.Modified;
	}
	
	public String getTitulo() {
		return this.Titulo;
	}
	
	public boolean isComplete() {
		return this.complete;
	}
	
	public void setAuthor(Member author) {
		this.Author = author;
	}
	
	public void setComplete(boolean complete) {
		this.complete = complete;
	}
	
	public void setModified(GregorianCalendar modified) {
		this.Modified = modified;
	}
	
	public void setTitulo(String titulo) {
		this.Titulo = titulo;
	}

	@Override
	public String toString() {
		return "Task [Titulo=" + Titulo + ", Author=" + Author
				+ ", Modified=" + Modified + "]";
	}
	
	public String toMessageString(Integer Id){
		Date tmp = new Date(Modified.getTimeInMillis());
		return ""+Id+" "+Titulo+" "+tmp;
	}
}
